// © 2009 Microsoft Corporation.  All rights reserved.
using Microsoft.InformationSecurity.ISRM.TaskManagment.Classes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;

namespace UnitTests
{
    
    
    /// <summary>
    ///This is a test class for CategoriesTest and is intended
    ///to contain all CategoriesTest Unit Tests
    ///</summary>
    [TestClass()]
    public class CategoriesTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for GetActiveCategories
        ///</summary>
        [TestMethod()]
        public void GetActiveCategoriesTest()
        {
            List<Category> lstCategories = (List<Category>)Categories.GetActiveCategories();
            Assert.IsNotNull(lstCategories, "Categories.GetActiveCategories is not working as expected");
        }

        /// <summary>
        ///A test for AddCategory
        ///</summary>
        [TestMethod()]
        public void AddCategoryTest()
        {
            Category category = new Category();
            category.Name = "ASDF" + (new System.Random()).NextDouble().ToString();
            int actual;
            actual = Categories.AddCategory(category);
            Assert.IsTrue(actual > 0);
        }

        /// <summary>
        ///A test for UpdateCategory
        ///</summary>
        [TestMethod()]
        public void UpdateCategoryTest()
        {
            Category category = null; // TODO: Initialize to an appropriate value
            Categories.UpdateCategory(category);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetAllCategories
        ///</summary>
        [TestMethod()]
        public void GetAllCategoriesTest()
        {
            ICollection<Category> expected = null; // TODO: Initialize to an appropriate value
            ICollection<Category> actual;
            actual = Categories.GetAllCategories();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetActiveCategories
        ///</summary>
        [TestMethod()]
        public void GetActiveCategoriesTest1()
        {
            ICollection<Category> expected = null; // TODO: Initialize to an appropriate value
            ICollection<Category> actual;
            actual = Categories.GetActiveCategories();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for DeleteCategory
        ///</summary>
        [TestMethod()]
        public void DeleteCategoryTest()
        {
            int categoryID = 0; // TODO: Initialize to an appropriate value
            string username = string.Empty; // TODO: Initialize to an appropriate value
            Categories.DeleteCategory(categoryID, username);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for AddCategory
        ///</summary>
        [TestMethod()]
        public void AddCategoryTest1()
        {
            Category category = null; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = Categories.AddCategory(category);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
